// 实现一个函数ex3，使用safeProp和fp.first找到user的名字的首字母

const { first, curry, flowRight } = require('lodash/fp')
const { Maybe } = require('./support')

let safeProp = curry((x, o) => Maybe.of(o[x]))
let user = { id: 2, name: 'Albert' }
let ex3 = flowRight(functor => functor.map(first), safeProp('name'))
console.log(ex3(user))
